<?php
/**
 * 短信验证码管理
 * Created by gii.
 * User: Gii
 * Date: 2024/01/22
 * Time: 07:35
 */

namespace App\Http\Admin\Logics;

use App\Models\Models\System\SystemUserCodes;

class UserCodesLogic
{
    public static function getListWithCount($where=[], $field='*', $page=1, $limit=10, $order=['id', 'desc']) {
        $where = SystemUserCodes::getSelfWhereCommon($where);
        return SystemUserCodes::getListWithCountCommon($where, $field, $page, $limit, $order);
    }

    public static function getAll() {
        return SystemUserCodes::getAllCommon();
    }

    public static function del($id) {
        return SystemUserCodes::delByPkCommon($id);
    }

    public static function update($data) {
        return SystemUserCodes::updateCommon($data);
    }

    public static function add($data) {
        return SystemUserCodes::addCommon($data);
    }

    public static function getInfo($id) {
        return SystemUserCodes::getLineByPkCommon($id);
    }

    public static function status($id, $status) {
        return SystemUserCodes::status($id, $status);
    }
}
